﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true"
    CodeBehind="DemoGroup.aspx.cs" Inherits="MLM.AdminCP.Pages.DemoGroup" Culture="auto"
    meta:resourcekey="PageResource1" UICulture="auto" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="gridPositioning">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" meta:resourcekey="RadAjaxManager1Resource1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="BookNowCloseButton">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="SaveSettingsButton">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <%--<telerik:RadButton ID="SaveSettingsButton" runat="server" Skin="WebBlue" Text="Save Settings"
            CssClass="settingsButton" Width="100px" OnClick="SaveSettingsButton_Click" />--%>
        <div style="max-width: 995px; padding-right: 10px;">
            <%--<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"
                Skin="WebBlue" AllowFilteringByColumn="True" OnItemCommand="RadGrid1_ItemCommand"
                CellSpacing="0" GridLines="None">--%>
            <telerik:RadGrid ID="RadProductGrid" runat="server" AllowFilteringByColumn="True"
                DataSourceID="GroupProductEds" AllowPaging="True" AllowSorting="True" GridLines="None"
                ShowGroupPanel="True"  AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
                AllowAutomaticDeletes="True" ShowFooter="True" ShowStatusBar="True" meta:resourcekey="RadProductGridResource1">
                <MasterTableView AutoGenerateColumns="false">
                    <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="true">
                        <%--ExportToPdfText="Export to Pdf">--%></CommandItemSettings>
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="ProductBaseID" DataType="System.Int64" HeaderText="ProductBaseID"
                            ReadOnly="True" SortExpression="ProductBaseID" UniqueName="ProductBaseID" HeaderStyle-Width="120px"
                            ItemStyle-Width="200px" meta:resourcekey="GridBoundColumnResource1">
                            <HeaderStyle Width="120px"></HeaderStyle>
                            <ItemStyle Width="200px"></ItemStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name"
                            UniqueName="Name" HeaderStyle-Width="120px" ItemStyle-Width="200px" meta:resourcekey="GridBoundColumnResource2">
                            <HeaderStyle Width="120px"></HeaderStyle>
                            <ItemStyle Width="200px"></ItemStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ThumbImage" HeaderText="ThumbImage" SortExpression="ThumbImage"
                            UniqueName="ThumbImage" HeaderStyle-Width="120px" ItemStyle-Width="200px" meta:resourcekey="GridBoundColumnResource3">
                            <HeaderStyle Width="120px"></HeaderStyle>
                            <ItemStyle Width="200px"></ItemStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="StockAvailable" HeaderText="StockAvailable" SortExpression="StockAvailable"
                            UniqueName="StockAvailable" HeaderStyle-Width="120px" DataType="System.Int64"
                            meta:resourcekey="GridBoundColumnResource4">
                            <HeaderStyle Width="120px"></HeaderStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ProductCategoryID" HeaderText="ProductCategoryID"
                            SortExpression="ProductCategoryID" UniqueName="ProductCategoryID" HeaderStyle-Width="120px"
                            DataType="System.Int64" meta:resourcekey="GridBoundColumnResource5">
                            <HeaderStyle Width="120px"></HeaderStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Points" DataType="System.Int64" HeaderText="Points"
                            SortExpression="Points" UniqueName="Points" meta:resourcekey="GridBoundColumnResource6">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Price" DataType="System.Double" HeaderText="Price"
                            SortExpression="Price" UniqueName="Price" meta:resourcekey="GridBoundColumnResource7">
                        </telerik:GridBoundColumn>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                            meta:resourcekey="GridEditCommandColumnResource1">
                            <ItemStyle CssClass="MyImageButton"></ItemStyle>
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                            UniqueName="DeleteColumn" meta:resourcekey="GridButtonColumnResource1">
                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                        </telerik:GridButtonColumn>
                    </Columns>
                    <EditFormSettings EditFormType="Template">
                        <EditColumn UniqueName="EditCommandColumn1">
                        </EditColumn>
                        <FormTemplate>
                            <table id="Table2" style="border-collapse: collapse; padding-left: 20">
                                <tr class="EditFormHeader" style="height: 30">
                                    <td style="font-size: small">
                                        <b><asp:Label runat="server" ID="lbproductdetails" Text="Product Details" 
                                            meta:resourcekey="lbproductdetailsResource1"></asp:Label></b>
                                    </td>
                                </tr>
                                <tr style="height: 30">
                                    <td>
                                       
                                        <asp:Label runat="server" ID="lbname" Text="Name:" 
                                            meta:resourcekey="lbnameResource1"></asp:Label>
                                    </td>
                                    <td style="width: 30">
                                        <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("Name") %>' TabIndex="1"
                                            meta:resourcekey="TextBox8Resource1"></asp:TextBox>
                                    </td>
                                    <td style="padding-left: 20; padding-right: 30">
                                        
                                        <asp:Label runat="server" ID="lbStockAvailable" Text="StockAvailable:" 
                                            meta:resourcekey="lbStockAvailableResource1"></asp:Label>
                                    </td>
                                    <td style="width: 50">
                                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("StockAvailable") %>' TabIndex="1"
                                            meta:resourcekey="TextBox2Resource1"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr style="height: 30">
                                    <td>
                                        
                                        <asp:Label runat="server" ID="lbThumbImage" Text="ThumbImage:" 
                                            meta:resourcekey="lbThumbImageResource1"></asp:Label>
                                    </td>
                                    <td style="width: 30">
                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ThumbImage") %>' TabIndex="1"
                                            meta:resourcekey="TextBox1Resource1"></asp:TextBox>
                                    </td>
                                    <td style="padding-left: 20; padding-right: 30">
                                        
                                        <asp:Label runat="server" ID="lbProductCategoryID" Text="ProductCategoryID:" 
                                            meta:resourcekey="lbProductCategoryIDResource1"></asp:Label>
                                    </td>
                                    <td style="width: 50">
                                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("ProductCategoryID") %>'
                                            TabIndex="1" meta:resourcekey="TextBox3Resource1"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr style="height: 30; padding-bottom: 30">
                                    <td>
                                        
                                        <asp:Label runat="server" ID="lbPoints" Text="Points:" 
                                            meta:resourcekey="lbPointsResource1"></asp:Label>
                                    </td>
                                    <td style="width: 30">
                                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Points") %>' TabIndex="1"
                                            meta:resourcekey="TextBox4Resource1"></asp:TextBox>
                                    </td>
                                    <td style="padding-left: 20; padding-right: 30">
                                        
                                        <asp:Label runat="server" ID="lbPrice" Text="Price:" 
                                            meta:resourcekey="lbPriceResource1"></asp:Label>
                                    </td>
                                    <td style="width: 50">
                                        <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("Price") %>' TabIndex="1"
                                            meta:resourcekey="TextBox5Resource1"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="padding-bottom: 10; padding-top: 10">
                                        <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                            meta:resourcekey="btnUpdateResource1"></asp:Button>&nbsp;
                                        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                            CommandName="Cancel" meta:resourcekey="btnCancelResource1"></asp:Button>
                                    </td>
                                </tr>
                            </table>
                        </FormTemplate>
                    </EditFormSettings>
                </MasterTableView>
                <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Office2007">
                </HeaderContextMenu>
            </telerik:RadGrid>
        </div>
    </div>
    <asp:EntityDataSource ID="GroupProductEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EnableDelete="True" EnableFlattening="False"
        EnableInsert="True" EnableUpdate="True" EntitySetName="ProductBases">
    </asp:EntityDataSource>
</asp:Content>
